﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileUpload.aspx.cs" Inherits="ADECMS.UserPages.FileUpload" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
     <link href="../Css/ADEStylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
        <table style="height: 150px;">
            <tr>
                <td style="font-family: Segoe Script; font-size: 48px; color: Purple; width: 20%;">
                    <a href="Start.aspx" style="font-family: Segoe Script; font-size: 48px; color: Purple; width: 20%; text-decoration:none;">
                    ADE
                    </a>
                </td>
                <td>
                    <asp:Label ID="Label5" runat="server" CssClass="inputLabel"></asp:Label>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="2" style="height: 45px;">
                    &nbsp;
                </td>
            </tr>
        </table>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Menu ID="Menu1" runat="server" Height="35px" onmenuitemclick="Menu1_MenuItemClick" 
                        Orientation="Horizontal" Width="664px" MaximumDynamicDisplayLevels="4" 
                    DisappearAfter="2000" Font-Bold="True" Font-Size="Small" ForeColor="Black">
                    <DynamicHoverStyle BackColor="#666666" />
                    <DynamicMenuStyle BackColor="Silver" />
                    <DynamicMenuItemStyle BackColor="Silver" />
                    <StaticHoverStyle BackColor="Gray" />
                    <Items>
                        <asp:MenuItem Text="Sign out" Value="Sign out"></asp:MenuItem>
                        <asp:MenuItem Text="Novosti" Value="Novosti">
                            <asp:MenuItem Text="Dodaj novost" Value="Dodaj novost" 
                                    Target="/UserPages/AddNews.aspx"></asp:MenuItem>
                            <asp:MenuItem Target="/UserPages/Search.aspx" 
                                    Text="Pretraga" Value="Pretraga"></asp:MenuItem>
                        </asp:MenuItem>
                        <asp:MenuItem Text="File manager" Value="File manager">
                            <asp:MenuItem Text="File upload" Value="File upload"></asp:MenuItem>
                             <asp:MenuItem Text="File download" Value="File download"></asp:MenuItem>
                        </asp:MenuItem>
                        <asp:MenuItem Text="Slide manager" Value="Slide manager">
                            <asp:MenuItem Text="Upload prezentacije" Value="Upload prezentacije">
                            </asp:MenuItem>
                            <asp:MenuItem Text="Pregled prezentacije" Value="Pregled prezentacije">
                            </asp:MenuItem>
                        </asp:MenuItem>
                        <asp:MenuItem Text="Profili" Value="Profili">
                            <asp:MenuItem Text="Pregledaj profil" 
                                    Value="Pregledaj profil"></asp:MenuItem>
                            <asp:MenuItem Text="Edituj profil" Value="Edituj profil"></asp:MenuItem>
                        </asp:MenuItem>
                    </Items>
                </asp:Menu>
            </ContentTemplate>
        </asp:UpdatePanel>
        
        <table>
            <tr style="height:20px">
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr style="height:20px">
                <td>
                    <asp:Label ID="Label118" runat="server" Text="Upload file-a:" 
                        CssClass="registracijaHeader"></asp:Label>
                </td>
            </tr>
            <tr style="height:20px">
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td style="width:200px">
                    &nbsp;
                </td>
                <td> 
                    <table>                     
                        <tr>
                            <td style="width:200px">
                                <asp:Label ID="Label4" runat="server" Text="Kategorija:" CssClass="inputLabel"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="DropDownList1" runat="server" CssClass="inputText"
                                    DataSourceID="LinqDataSource1" DataTextField="name" DataValueField="name">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr style="height:20px">
                            <td colspan="2">
                            <br />
                                <asp:Label ID="Label119" runat="server" Text="Opis fajla (opcionalno):" 
                                    CssClass="inputLabel"></asp:Label>
                                    <br />
                                    <br />
                                <cc2:Editor ID="Editor1" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                            <br />
                            <br />
                                <asp:Label ID="Label2" runat="server" Text="File:" CssClass="inputLabel"></asp:Label>
                                <asp:FileUpload ID="FileUpload1" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="Label3" runat="server" CssClass="inputObligatory"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="height:70px;">
                                <asp:Button ID="Submit" runat="server" onclick="Submit_Click" 
                                    style="margin-left: 280px" Text="Submit" />
                                <asp:Button ID="ButtonBack" runat="server" onclick="ButtonBack_Click" 
                                    style="margin-left: 10px" Text="Back" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                                    ContextTypeName="ADECMS.ADECMSDBDataContext" Select="new (name)" 
                                    TableName="CATEGORies" Where="type == @type">
                                    <WhereParameters>
                                        <asp:Parameter DefaultValue="file" Name="type" Type="String" />
                                    </WhereParameters>
                                </asp:LinqDataSource>
                             </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
